package com.eurobcoin.trading;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class TradingOperationResult implements Serializable {

	private static final long serialVersionUID = -8750333631472977396L;
	
	public static final int BUY_OPERATION_TYPE = 1;
	public static final int SELL_OPERATION_TYPE = 2;
	
	public static final int OPERATION_OK_CODE = 0;
	public static final int NOT_ENOUGH_LEFT_CURRENCY_CODE = 1;
	public static final int NOT_ENOUGH_RIGHT_CURRENCY_CODE = 2;
	
	private int code;
	
	private int userId;
	
	private long amount;
	
	private int operationType;
	
	private long price;
	
	private int firstCurrencyId;
	
	private int secondCurrencyId;
	
	private List<TradingPartialOperation> operations;

	public TradingOperationResult() {
		this.operations = new ArrayList<TradingPartialOperation>();
	}
	
	public void addTradingPartialOperation(TradingPartialOperation tradingPartialOperation) {
		this.operations.add(tradingPartialOperation);
	}
	
	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public long getAmount() {
		return amount;
	}

	public void setAmount(long amount) {
		this.amount = amount;
	}

	public int getOperationType() {
		return operationType;
	}

	public void setOperationType(int operationType) {
		this.operationType = operationType;
	}

	public long getPrice() {
		return price;
	}

	public void setPrice(long price) {
		this.price = price;
	}

	public int getFirstCurrencyId() {
		return firstCurrencyId;
	}

	public void setFirstCurrencyId(int firstCurrencyId) {
		this.firstCurrencyId = firstCurrencyId;
	}

	public int getSecondCurrencyId() {
		return secondCurrencyId;
	}

	public void setSecondCurrencyId(int secondCurrencyId) {
		this.secondCurrencyId = secondCurrencyId;
	}
	
}
